package felix.things.router.opc.conf;

import felix.things.router.config.OpcUaConstant;
import felix.things.router.opc.conf.identity.IdentityProviderConfiguration;
import felix.things.router.opc.conf.identity.KeystoreConfiguration;
import felix.things.router.opc.conf.mapping.DeviceMapping;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class OpcUaServerConfiguration {

    private String applicationName;
    private String applicationUri;
    private String host;
    /**
     * subscribe    订阅模式
     * polling      轮询模式
     */
    private String type = OpcUaConstant.TYPE_SUBSCRIBE;
    /**
     * 轮询时间间隔
     */
    private int pollingInSeconds = 3;
    private int port;
    /**
     * 重试连接间隔
     */
    private long retryInterval = 2000;
    /**
     * 设备扫描间隔
     */
    private int scanPeriodInSeconds = 300;
    /**
     * 超时时间
     */
    private int timeoutInMillis = 5000;
    private String security = "None";
    private IdentityProviderConfiguration identity = new IdentityProviderConfiguration();
    private KeystoreConfiguration keystore = new KeystoreConfiguration();
    private String rootNode = "i=85";
    private List<DeviceMapping> mapping = new ArrayList<>();

}
